<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<head>
    <meta charset="utf-8" />
    <%@include file="../common/taglib.jsp"%>
    <title>保险代理后台管理系统</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <jsp:include page="../common/header.jsp"/>
    <!-- ================== END BASE CSS STYLE ================== -->

	<style>
        .form-control{
        	width:200px;
        }
        tr td:first-child, tr th:first-child{
        	text-align:center;
        }
    </style>

</head>
<body>
<section class="pad-top-10 pad-bottom-20">
                        	<div class="table-responsive">
                           		<div class="form-wrap mar-bottom-0">
                             		<div class="tab-content">
                    					<div id="tab2" class="tab-pane fade active in">
                    					
                        					<form role="form" class="form-horizontal form-bordered" method="post" action="<%=path %>/sysdic/add" id="dicForm2" data-parsley-validate="true">
												<input type="hidden" name="createUser" id="createUser" value="<shiro:principal property="realName" />">
                            						<div class="form-group">
                                						<label class="col-md-1 control-label" style="width: 110px;" for="name">类型</label>
                                							<div class="col-md-2">
                                									<input type="text" class="form-control" id="type" name="type" placeholder="请输入字典类型" data-parsley-required="true" data-parsley-required-message="类型不能为空" data-parsley-maxlength="30" data-parsley-maxlength-message="类型最长为30">
                                							</div>
                                					<span id="typeMessage"></span>
                            						</div>

                            						<div class="form-group">
                                						<label class="control-label col-md-4 col-sm-4" style="width: 110px;" for="name">键</label>
                                							<div class="col-md-6 col-sm-6">
                                									<input type="text" class="form-control" id="riskKey" name="riskKey" placeholder="请输入键" data-parsley-required="true" data-parsley-required-message="键不能为空" data-parsley-maxlength="30" data-parsley-maxlength-message="键最长为30">
                                							</div>
                                					<span id="riskKeyMessage"></span>
                            						</div>

                            						<div class="form-group">
                                						<label class="control-label col-md-4 col-sm-4" style="width: 110px;" for="name">键值</label>
                                							<div class="col-md-6 col-sm-6">
                                									<input type="text" class="form-control" id="riskValue" name="riskValue" placeholder="请输入值" data-parsley-required="true" data-parsley-required-message="键值不能为空" data-parsley-maxlength="100" data-parsley-maxlength-message="键值最长为100">
                                					<span id="riskValueMessage"></span>
                               					 			</div>
                            						</div>

                            						<div class="form-group">
                                						<label class="control-label col-md-4 col-sm-4" style="width: 110px;" for="name">字典描述</label>
                                							<div class="col-md-6 col-sm-6">
                                									<input type="text" class="form-control" id="description" name="description" placeholder="请输入字典描述" data-parsley-required="true" data-parsley-required-message="字典描述不能为空" data-parsley-maxlength="200" data-parsley-maxlength-message="字典描述最长为200">
                                					<span id="descriptionMessage"></span>
                                							</div>
                            						</div>
                            						
                            						<div class="form-group">
                                                    	<label class="control-label col-md-4 col-sm-4" style="width: 110px;">&nbsp;</label>
                                                    		<div class="col-md-6 col-sm-6">                                                      
                            										<button type="submit" class="btn btn-primary m-r-10">提交</button>
                                                        			<a onclick="getParent()" class="btn btn-default" data-toggle='modal'>&nbsp;取消&nbsp;</a>
                                                   		 	</div>
                                           			</div>
                       						 </form>
                    					</div>                    					                    					                    				    
                     </div>
                     </div>
                   </div>
              </section>
    <!-- begin scroll to top btn -->
    <a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
    <!-- end scroll to top btn -->
<!-- end page container -->
<jsp:include page="../common/footer.jsp"/>


<!-- ================== END PAGE LEVEL JS ================== -->

<script>
    $(document).ready(function() {
        App.init();
        Dashboard.init();
    });
    
    function tolist(){
    	window.location.href="<%=path %>/sysdic/tolist";
    }
    
    
    function getParent(){
    	$("#modal-dialog",window.parent.document).modal().show();
    }
</script>

</body>
</html>
